<div class="admin">
    <div class="tab panel dux-box admin-panel">
        <div class="panel-head"><strong>修改优惠券</strong></div>
        <div class="fixed-empty"></div>
        <form id="myform" name="myform" method="post" action="">
            <table class="table tb-type2">
                <tbody>
                    <tr>
                        <td width='8%' class="required"><label class="validation" for="voucher_title">代金券名称:</label></td>
                        <td class="vatop rowform"><input type="text" class="form-control" value="{$re['voucher_title']}" datatype="*" name="voucher_title" size="60" /></td>
                        <td class="vatop tips"></td>
                    </tr>
                    <tr>
                        <td class="required"><label class="validation" for="voucher_start_date">开始日期:</label></td>
                        <td class="vatop rowform"><input type="text" class="input input_small" style="float:left;" readonly="readonly" datatype="*" value="{$re['voucher_start_date']|date='Y-m-d H:i:s',###}" id="voucher_start_date" name="voucher_start_date"><em class="add-on"><i class="icon-calendar"></i></em></td>
                        <td class="vatop tips"></td>
                    </tr>
                    <tr>
                        <td class="required"><label class="validation" for="voucher_end_date">结束效期:</label></td>
                        <td class="vatop rowform"><input type="text" class="input input_small" style="float:left;" readonly="readonly" datatype="*" value="{$re['voucher_end_date']|date='Y-m-d H:i:s',###}" id="query_end_time" name="voucher_end_date"><em class="add-on"><i class="icon-calendar"></i></em></td>
                        <td class="vatop tips"></td>
                    </tr>
                    <tr>
                        <td class="required"><label class="validation" for="voucher_price">面额:</label></td>
                        <td class="vatop rowform"><input type="text" class="form-control" name="voucher_price" id="voucher_price" size="60" value="{$re['voucher_price']}" /></td>
                        <td class="vatop tips"></td>
                    </tr>
                    <tr>
                        <td class="required"><label class="validation" for="voucher_limit">消费金额:</label></td>
                        <td class="vatop rowform"><input type="text" class="form-control" name="voucher_limit" size="60" value="{$re['voucher_limit']}" /></td>
                        <td class="vatop tips"></td>
                    </tr>
                    <tr>
                        <td class="required"><label class="validation" for="voucher_total">可发放总数:</label></td>
                        <td class="vatop rowform"><input type="text" class="form-control" size="60"  name="voucher_total" value="{$re['voucher_total']}" /></td>
                        <td class="vatop tips"></td>
                    </tr>
                    <tr>
                        <td class="required"><label class="validation" for="voucher_eachlimit">每人限领:</label></td>
                        <td class="vatop rowform">
                            <select name="voucher_eachlimit" class="inputL input_small">
                                <option value="1" <if condition="$v['voucher_eachlimit'] eq 1">selected="selected"</if>>1</option>
                                <option value="2" <if condition="$v['voucher_eachlimit'] eq 2">selected="selected"</if>>2</option>
                                <option value="3" <if condition="$v['voucher_eachlimit'] eq 3">selected="selected"</if>>3</option>
                                <option value="4" <if condition="$v['voucher_eachlimit'] eq 4">selected="selected"</if>>4</option>
                                <option value="5" <if condition="$v['voucher_eachlimit'] eq 5">selected="selected"</if>>5</option>
                            </select>
                        </td>
                        <td class="vatop tips"></td>
                    </tr>
                    <tr>
                        <td class="required">是否可领取:</td>
                        <td class="vatop rowform">
                            <div class="form-group">
                                <div class="field">
                                    <div class="button-group radio">
                                        <if condition="$v['voucher_recommend'] eq 1">
                                            <div class="form-group">
                                                <div class="field">
                                                    <div class="button-group radio">
                                                        <label class="button active">
                                                            <input name="voucher_recommend" value="1" checked="checked" type="radio"><span class="icon icon-check"></span> 可领取
                                                        </label>
                                                        <label class="button">
                                                            <input name="voucher_recommend" value="0" type="radio"><span class="icon icon-times"></span> 不可领取
                                                        </label>
                                                    </div>
                                                </div>
                                            </div>
                                            <else />
                                            <div class="form-group">
                                                <div class="field">
                                                    <div class="button-group radio">
                                                        <label class="button">
                                                            <input name="voucher_recommend" value="1" type="radio"><span class="icon icon-check"></span> 可领取
                                                        </label>
                                                        <label class="button active">
                                                            <input name="voucher_recommend" value="0" checked="checked" type="radio"><span class="icon icon-times"></span> 不可领取
                                                        </label>
                                                    </div>
                                                </div>
                                            </div>
                                        </if>
                                    </div>
                                </div>
                            </div>
                            <!--这是老的-->
                        </td>
                        <td class="vatop tips"></td>
                    </tr>
                    <tr>
                        <td class="required"><label class="validation" for="voucher_desc">代金券描述:</label></td>
                        <td class="vatop rowform"><textarea class="input" name="voucher_desc" id="voucher_desc" cols="62" rows="3">{$re['voucher_desc']}</textarea></td>
                        <td class="vatop tips"></td>
                    </tr>
                </tbody>
                <tfoot>
                    <tr>
                <input type="hidden" value="{$re['voucher_id']}" name='voucher_id' />
                <td colspan="3"><input class="button bg-main" type="submit" value="提交"></td>
                </tr>
                </tfoot>
            </table>
        </form>
    </div>
</div>
<script type="text/javascript">
    $('#myform').layer({});
    $('#voucher_start_date').duxTime({
        minDate: 0,
        format: "Y-m-d H:i"
    });
    $('#query_end_time').duxTime({
        minDate: 0,
        format: "Y-m-d H:i"
    });
</script>
